﻿Public Class frmMantenimientoNivel
    Private vtn_frmListaTutores As frmListaTutores = New frmListaTutores
    Private res As DialogResult
    Private Sub btnNuevo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNuevo.Click
        Dim vtn_frmRegistrarNivel As frmRegistrarNivel = New frmRegistrarNivel()
        vtn_frmRegistrarNivel.Show()
    End Sub

    Private Sub btnbuscarTutor_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_buscarTutor.Click
        'Dim vtn_frmListaTutores As frmListaTutores = New frmListaTutores()
        'vtn_frmListaTutores.Show()
        res = vtn_frmListaTutores.ShowDialog()
        If (res = DialogResult.OK) Then
            If vtn_frmListaTutores.dgvTutores.SelectedRows.Count = 1 Then
                'With vtn_frmListaTutores.dgvTutores.SelectedRows.Item(0)
                Me.txtTutor.Text = vtn_frmListaTutores.dgvTutores.SelectedRows.Item(0).Cells(0).Value
                'End With
            End If
        End If
    End Sub

    Private Sub btnModificar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnModificar.Click
        Dim vtn_frmRegistrarNivel As frmRegistrarNivel = New frmRegistrarNivel()
        With vtn_frmRegistrarNivel
            .Text = "Modificar Nivel"
            .Show()
        End With

    End Sub

    Private Sub frmMantenimientoNivel_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub


    Private Sub btnBuscarNivel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBuscarNivel.Click

    End Sub

    Private Sub btnEliminar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEliminar.Click

    End Sub

    Private Sub btnCancelar_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancelar.Click

    End Sub
#Region "VALIDACIONES"
    'Valida que se desee realmente cancelar la transaccion
    Private Sub btnCancelar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancelar.Click
        If MessageBox.Show("¿Desea cancelar la transacción?", "Aviso", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) = Windows.Forms.DialogResult.Yes Then
            'Button 1 es el Si, Button 2 es el No, Button 3 es el Cancel
            Me.Close()
            Me.Dispose()

        End If
    End Sub
#End Region
End Class